OpenRoads Designer CONNECT Edition SDK Help

Create Corridor from existing Alignment

To create a new corridor from existing alignment, the alignment must have profile model created. The below code snippet shows how to create a 2D corridor using the alignment and its active profile.

Example


internal Corridor CreateCorridor(Alignment alignment)
        {
            //Validate alignment and its active profile
            if (alignment == null && alignment.ActiveProfile == null)
                return null;

            //create corridor using alignment
            Bentley.CifNET.GeometryModel.SDK.Corridor corridorObj = alignment.
CreateCorridorByAlignment("Sample Corridor");
            if (corridorObj == null)
                return null;

            return corridorObj;
        }

Alignment.CreateCorridorByAlignment() is used here for creating corridor.